
import FooterView from "@/layout/FooterView.vue"

import HomeView from "@/views/Home/index.vue"
import CategoryView from "@/views/Category/index.vue"
import CarView from "@/views/Car/index.vue"
import DetailView from "@/views/Detail/index.vue"
import MineView from "@/views/Mine/index.vue"
import LoginView from "@/views/Login/index.vue"
import RegisterView from "@/views/Register/index.vue"

let routes = [
    {
        path: '/',
        redirect: "/home",
    },
    {
        path: '/home',
        name: 'home',
        components: {
            default: HomeView,
            footer: FooterView,
        }
    },
    {
        path: '/category',
        name: 'category',
        components: {
            default: CategoryView,
            footer: FooterView,
        }
    },
    {
        path: '/detail',
        name: 'detail',
        component: DetailView
    },
    {
        path: '/car',
        name: 'car',
        components: {
            default: CarView,
            footer: FooterView,
        }
    },
    {
        path: '/order',
        name: 'order',
        component: ()=> import("../views/Order/index.vue")
    },
    {
        path: '/address',
        name: 'address',
        component: ()=> import("../views/Address/index.vue")
    },
    {
        path: '/address/add',
        name: 'address-add',
        component: ()=> import("../views/Address/AddressAdd/index.vue")
    },
    {
        path: '/mine',
        name: 'mine',
        components: {
            default: MineView,
            footer: FooterView,
        }
    },
    {
        path: '/register',
        name: 'register',
        component: RegisterView
    },
    {
        path: '/login',
        name: 'login',
        component: LoginView
    },
]

export default routes;